JP-A-2004-29396 discloses an image forming apparatus of an electrophotograph system, which forms an image by transferring a developer image to a recording sheet. The image forming apparatus uses a developer accommodated within a developer casing such as a process cartridge. To detect an amount of the developer remaining within the developer casing, the image forming apparatus has a light emitting element and a light receiving element, which are provided at respective ends in a width direction of the developer casing (or process cartridge), so that the light receiving element receives light emitted from the light emitting element and passing through the developer casing. To detect whether the light receiving element received the light, an output voltage of the light receiving element is monitored at every predetermined time interval (5 msec).
Based on the output voltage monitored thus, the image forming apparatus computes a ratio of a number of times the light receiving element received the light relative to the predetermined number of times of monitoring (e.g. 400 times). Hereinafter, the ratio is referred to as the light receiving ratio. If the light receiving ratio is less than 2%, the image forming apparatus determined that an amount of the developer in the developer casing is sufficient. If the light receiving ratio is more than 20%, the image forming apparatus determines that an amount of the developer in the developer casing is depleted.